@section('content')
<div class="row">
	<div class="col-md-6">
		<h2>All the Categories</h2>
	</div>
</div>

<div class="row">
	<div class="col-md-12">
		<table class="table table-hover table-striped table-bordered">
		<thead>
			<tr>
				<th>ID</th>
				<th>Name</th>
				<th>Actions</th>
			</tr>
		</thead>
		<tbody>
			@foreach($categories as $category)
			<tr>
				<td>{{ $category->id }}</td>
				<td>{{ $category->name }}</td>
				<td>
					{{ Form::open(array('url' => 'admin/category/' . $category->id, 'class' => 'pull-right')) }}
						{{ Form::hidden('_method', 'DELETE') }}
						{{ Form::submit('Delete this Category', array('class' => 'btn btn-warning')) }}
					{{ Form::close() }}
					<a class="btn btn-small btn-success" href="{{ url('admin/category/' . $category->id) }}">Show this Category</a>
					<a class="btn btn-small btn-info" href="{{ url('admin/category/' . $category->id . '/edit') }}">Edit this Category</a>
				</td>
			</tr>
			@endforeach
		</tbody>
		</table>
	</div>
</div>
@stop